<template>
  <div>
    <el-input-number
      v-if="item.countType===1"
      v-model="item.num"
      class="inputNumber"
      step-strictly
      :min="1"
      :max="item.totalNumber"
      label="描述文字"
      @change="handleChange"
    />
    <el-input-number v-else v-model="item.num" class="inputNumber" :precision="1" :min="0.1" :step="0.1" :max="item.totalNumber" @change="handleChange" />
  </div>
</template>

<script>
export default {
  props: {
    item: Object,
    default: () => ({})
  },
  data() {
    return {
      num1: 1,
      num2: 0.1
    }
  },

  created() {
  },

  methods: {
    handleChange(value) {
      this.$emit('change', value)
    }
  }
}
</script>

<style scoped lang="scss">
  .inputNumber {
      width: 150px;
      margin-right: 5px;
    }
</style>
